package com.ls.lserp.dbaccess.Dao;

import java.util.List;

import com.ls.lserp.common.persistence.CrudDao;
import com.ls.lserp.common.persistence.annotation.MyBatisDao;
import com.ls.lserp.dbaccess.Entity.ContractCustomEntity;
@MyBatisDao
public interface ContractCustomEntityMapper extends CrudDao<ContractCustomEntity>{
    int deleteByPrimaryKey(Long contractId);

    int insert(ContractCustomEntity record);

    int insertSelective(ContractCustomEntity record);

    ContractCustomEntity selectByPrimaryKey(Long contractId);

    int updateByPrimaryKeySelective(ContractCustomEntity record);

    int updateByPrimaryKeyWithBLOBs(ContractCustomEntity record);

    int updateByPrimaryKey(ContractCustomEntity record);
    /**
     * @Description 定时获取数据供财务业务结算使用
     * @param contractCustomEntity
     * @return
     */
    List<ContractCustomEntity> findListForFinance(ContractCustomEntity contractCustomEntity);
    /**
     * @Description 更新定时获取的数据状态
     * @param contractCustomEntity
     */
    int updateStatus(ContractCustomEntity contractCustomEntity);
    
    /**
     * 合同号获取数据
     * @param contractNo
     * @return
     */
    ContractCustomEntity getByCode(String contractNo);
    
    /**
     * 
     * @param contractCustomEntity
     * @return
     */
    List<ContractCustomEntity> findContractList(ContractCustomEntity contractCustomEntity);
    
    /**
     * 
     * @param contractCustomEntity
     * @return
     */
    List<ContractCustomEntity> findContractMTMList(ContractCustomEntity contractCustomEntity);
    
    /**
     * 更新同步状态
     * @param contractCustomEntity
     * @return
     */
    int updateSyncStatus(ContractCustomEntity contractCustomEntity);
    
    /**
     * 更新同步状态
     * @param contractCustomEntity
     * @return
     */
    int updateSyncStatusMTM(ContractCustomEntity contractCustomEntity);
    
    int insertList(List<ContractCustomEntity> contractCustomEntities);
}